// 搜索历史记录的 键名称
const HMTT_HISTORY = 'HMTT_HISTORY'
const HMTT_MANAGE = 'HMTT_MANAGE'
// 设置历史记录
export const setHistory = (array) => {
    return localStorage.setItem(HMTT_HISTORY,JSON.stringify(array))
}
// 获取历史记录
export const getHistory = () => {
   return JSON.parse(localStorage.getItem(HMTT_HISTORY)) || []
}
// 清空历史记录
export const removeHistory = () => {
    return localStorage.removeItem(HMTT_HISTORY)
 }

 // 设置栏目数据，包含选中栏目和未选中栏目
export const setManage = (object) => {
    return localStorage.setItem(HMTT_MANAGE,JSON.stringify(object))
}
 // 获取栏目数据，包含选中栏目和未选中栏目
 export const getManage = () => {
    return JSON.parse(localStorage.getItem(HMTT_MANAGE)) || {}
}